import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/index',
      name: 'index',
      component:()=>import('../pages/index'),
      redirect:'index/statistics',
      children:[
        {
          path: 'statistics',
          name: 'statistics',
          component: () => import('../pages/statistics')
        }, {
          path: 'mail',
          name: 'mail',
          component: () => import('../pages/mail')
        }, {
          path: 'addContact',
          name: 'addContact',
          component: () => import('../pages/addContact')
        }, {
          path: 'mine',
          name: 'mine',
          component: () => import('../pages/mine')
        }
      ]
    },{
    path: '/',
    name: 'login',
    component:()=>import('../pages/login')
  }
  ]
})
